<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url()?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">等级管理（电子商铺）</span></div>
</div>
<div class="result-wrap">
    <form name="myform" id="myform" method="post">
        <div class="result-title">
            <div class="result-list">
                <a href="<?=site_url('level/create')?>"><i class="icon-font"></i>新增等级</a>
                <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
            </div>
        </div>
        <div class="result-content">
            <table class="result-tab" width="100%">
                <tr>
                    <th>层级</th>
                    <th title="会员系统对应ID">ID</th>
                    <th>名称</th>
                    <th>预付金额</th>
                    <th>配送店铺</th>
                    <th>单个成本</th>
                    <th>分销资格</th>
                    <th>单提成比</th>
                    <th>最大利润比</th>
                    <th>最大利润额</th>
                    <th>最小利润比</th>
                    <th>最小利润额</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>

                <?php foreach($list as $k => $v): ?>
                <tr>
                    <td><?=$v['hierarchy']?></td>
                    <td title="会员系统对应ID"><?=$v['group_id']?></td>
                    <td><?=$v['name']?></td>
                    <td><?=$v['prepaid']?></td>
                    <td><?=$v['num']?></td>
                    <td><?=$v['cost']?></td>
                    <td><?php 
                            switch ($v['power']) {
                                case '1':
                                    echo '有';
                                    break;

                                case '2':
                                    echo '没有';
                                    break;

                                case '3':
                                    echo '';
                                    break;
                                
                                default:
                                    echo '不能识别';
                                    break;
                            }
                        ?>
                    </td>
                    <td><?=$v['commission']*100?>%</td>
                    <td><?=$v['max']*100?>%</td>
                    <td><?=$v['max_num']?></td>
                    <td><?=$v['min']*100?>%</td>
                    <td><?=$v['min_num']?></td>
                    <td width="150"><?=$v['note']?></td>
                    <td>
                        <a class="link-update" href="<?=site_url('level/update?oid='.$v['id'])?>">修改</a>
                        <a class="link-del" href="#">删除</a>
                    </td>
                </tr>
                <?php endforeach;?>
            </table>
        </div>
    </form>
</div>